package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.WarehouseManagementMapper;
import com.ruoyi.system.domain.WarehouseManagement;
import com.ruoyi.system.service.IWarehouseManagementService;

/**
 * 仓库管理 Service业务层处理
 *
 * @author ruoyi
 * @date 2025-05-29
 */
@Service
public class WarehouseManagementServiceImpl implements IWarehouseManagementService
{
    @Autowired
    private WarehouseManagementMapper warehouseManagementMapper;

    /**
     * 通过id查询仓库管理
     *
     * @param id 仓库管理主键
     * @return 仓库管理
     */
    @Override
    public WarehouseManagement selectWarehouseManagementById(Long id)
    {
        return warehouseManagementMapper.selectWarehouseManagementById(id);
    }

    /**
     * 通过仓库名称和状态查询仓库管理列表
     *
     * @param warehouseName,status 仓库名称,状态
     * @return 仓库管理
     */
    @Override
    public List<WarehouseManagement> selectWarehouseManagementListByName(String warehouseName,String status)
    {
        return warehouseManagementMapper.selectWarehouseManagementListByName(warehouseName,status);
    }

    /**
     * 新增仓库管理
     *
     * @param warehouseManagement 仓库管理
     * @return 结果
     */
    @Override
    public int insertWarehouseManagement(WarehouseManagement warehouseManagement)
    {
        return warehouseManagementMapper.insertWarehouseManagement(warehouseManagement);
    }

    /**
     * 修改仓库管理
     *
     * @param warehouseManagement 仓库管理
     * @return 结果
     */
    @Override
    public int updateWarehouseManagement(WarehouseManagement warehouseManagement)
    {
        return warehouseManagementMapper.updateWarehouseManagement(warehouseManagement);
    }

    /**
     * 通过id批量删除仓库管理信息
     *
     * @param ids 需要删除的仓库管理主键
     * @return 结果
     */
    @Override
    public int deleteWarehouseManagementByIds(Long[] ids)
    {
        return warehouseManagementMapper.deleteWarehouseManagementByIds(ids);
    }

    /**
     * 通过id删除仓库管理信息
     *
     * @param id 仓库管理主键
     * @return 结果
     */
    @Override
    public int deleteWarehouseManagementById(Long id)
    {
        return warehouseManagementMapper.deleteWarehouseManagementById(id);
    }
}
